package com.kgc.controller;

import com.kgc.entity.College;
import com.kgc.service.CollegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("college")
public class CollegeServlet {
    @Autowired
  private CollegeService collegeService;

    @RequestMapping("list")
    @ResponseBody
    public List<College> findAll(){
        return collegeService.findAllType();
    }
}
